/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ucm;

import model.Status_Model;
import view.St_Login_View;
import view.Te_Set_View;

/**
 *
 * @author 马凯
 */
public class SignIn_UC {

    private static SignIn_UC siuc;
    private Te_Set_View tsv;
    private St_Login_View slv;
    private String lesson_ID;
    private String teacher_ID;

    public static SignIn_UC getInstance(Te_Set_View tsv) {
        if (siuc == null) {
            siuc = new SignIn_UC();
            siuc.tsv = tsv;
            siuc.lesson_ID = tsv.getSetModel().getSub_TF().getText();
            siuc.teacher_ID = tsv.getSetModel().getTeID_TF().getText();
        }
        return siuc;
    }

    public void run() {
        slv = St_Login_View.getInstance(this); slv.setVisible(true);
        this.tsv.setVisible(false);
    }
    
    public Status_Model getStatusModel(){
        Status_Model sm = new Status_Model();
        sm.setLesson_ID(lesson_ID);
        sm.setTeacher_ID(teacher_ID);
        return sm;
    }
}
